Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Allow slashes in repository names #7022

Closed
wants to merge 7 commits into from

Conversation

typeless
Copy link
Contributor

@typeless typeless commented May 23, 2019

For #3840

What it does:

  1. Add a new type of route pattern :name+, where + means this path segment can contain slahes.
  2. Make the URL router recognize the 'path separator /+/.
    E.g. http://localhost:3000/org/test-repo/+/issues
    The choice of the path separator is inspired by Gitiles
    E.g., https://fuchsia.googlesource.com/third_party/github.com/golang/appengine/+/refs/heads/master
  3. Update the routes at routes/routes/routes.go and all templates containing {{.RepoLink}}

For now, :name+ has no difference than :name. It will be implemented later on.

TODO

  1. Update routes for APIs. Might need a v2.
  2. Update repository name validator.
  3. Add & update tests.

@typeless typeless changed the title [WIP] Allowing slashes in repository names [WIP] Allow slashes in repository names May 23, 2019
@typeless typeless changed the title [WIP] Allow slashes in repository names WIP: Allow slashes in repository names May 24, 2019
@lafriks
Copy link
Member

lafriks commented May 24, 2019

To be honest I don't quite like the idea as it will totally break all historical urls from external systems (Jenkins, Redmine, Drone CI, chats etc)

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 24, 2019
@lafriks lafriks added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label May 24, 2019
@typeless
Copy link
Contributor Author

@lafriks
Thanks for your response. I can understand your concerns.

I will try to find another solution that maintains backward-compatibility.

@typeless typeless closed this May 25, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants